package chapter5.homework;

/**
 * 作业：演示this 局部变量的程序
 *
 * @author 张玮婷 20245080902061
 */

public class Student {
    private final String name;
    private int age;
    private double score;

    // 构造方法
    public Student(String name, int age, double score) {
        this.name = name;
        this.age = age;
        this.score = score;
    }

    public void printInfo() {
        System.out.println("姓名: " + name + ", 年龄: " + age + ", 成绩: " + score);
    }

    public void setAge(int age) {

        this.age = age;
    }

    public void setScore(double score) {
        this.score = score;
    }
}
